<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/7/31
 * Time: 15:20
 */
namespace Admin\Controller;
use Think\Controller;
class BaseController extends Controller {

    public function _initialize(){
    	header("Content-Type:text/html; charset=utf-8");
        //判断用户是否已经登录
        if (!isset($_SESSION['userLogin']) || !isset($_SESSION['userLogin1'])) {
            $this->error('请先登录再进行浏览', U('Login/login'), 1);
        }
    }

}